package net.orange.framework.logic;

import java.util.Collection;

import net.orange.architecture.process.BaseProcess;
import net.orange.framework.dao.ICommoninfoDao;
import net.orange.framework.model.Commoninfo;

/**
 * The common info business logical process object which implement the
 * ICommoninfoProcess interface.
 */
public class CommoninfoProcess extends BaseProcess implements
		ICommoninfoProcess {

	/*
	 * (non-Javadoc)
	 * 
	 * @see net.orange.framework.commoninfo.process.ICommoninfoProcess#get(java.lang.String,
	 *      java.lang.String)
	 */
	public Commoninfo get(String type, String code) throws Exception {
		return (Commoninfo) ((ICommoninfoDao) dao).findByKey(type, code);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see net.orange.framework.commoninfo.process.ICommoninfoProcess#list(java.lang.String)
	 */
	public Collection list(String type) throws Exception {
		return (Collection) ((ICommoninfoDao) dao).listByKey(type);
	}
}